package com.gsc.funnycode.util;

import lombok.Data;

/**
 * @Author: Orange
 * @Date: 14:11 2022/4/30
 * 系统返回结果
 */
@Data
public class Result {
    private Object data;
    private String msg;
    private Object extra;

    public Result(Object data,String msg,Object extra){
        this.data = data;
        this.msg = msg;
        this.extra = extra;
    }

    public static Result Success(Object data,String meg){
        return new Result(data,meg,null);
    }

    public static Result Success(Object data,String msg,Object extra){
        return new Result(data,msg,extra);
    }

    public static Result Fail(String msg){
        return new Result(null,msg,null);
    }
}
